"""
在本地运行启动IotDB数据库进行测试

"""


from iotdb.Session import Session

ip = "127.0.0.1"
port_ = "6667"
username_ = "root"
password_ = "root"
session = Session(ip, port_, username_, password_)
session.open(False)
result = session.execute_query_statement("SELECT * FROM root.fd001.uavaa01.gps")

# Transform to Pandas Dataset
df = result.todf()

session.close()

# Now you can work with the dataframe
df.to_csv("file.csv")